package DataAccess.Storage;

import java.io.Serializable;
import java.awt.Color;
import DistSys.Zone;
/**
 * Title:        iPAD
 * Description:
 * Copyright:    Copyright (c) 2002
 * Company:      ABB Inc.
 * @author Fangxing Li
 * @version 1.0
 */

public class ZoneForStorage implements Serializable{
    public static final long serialVersionUID=100202L;

    protected double dZoneNumber;
    protected String sZoneLabel;
    protected int    iZoneColor;

    public ZoneForStorage() { }

    public void copyFromZone(Zone zn ){
        this.dZoneNumber = zn.getZoneNumber();
        this.sZoneLabel = zn.getZoneLabel();
        this.iZoneColor = zn.getZoneColor().getRGB();
    }

    public Zone createZoneFromThis( ){
        Zone zn = new Zone( );
        zn.setZoneNumber( this.dZoneNumber );
        zn.setZoneLabel(  this.sZoneLabel );
        zn.setZoneColor(  new Color( this.iZoneColor ));
        return zn;
    }
}